package cn.edu.scau.cmi.huhaoxian.multi_case;

import java.util.ArrayList;

public class MarshalDelegation {
	private static final int  COUNT = 10;
	protected static int lave = 10; 
	private static ArrayList<Marshal> mars = new ArrayList<>();
	
	public static ArrayList<Marshal> getAllMarshal() {
		return mars;
	}
	
	public static boolean addMarshal(String name) {
		if(isLave()) {
			lave--;
			mars.add(Marshal.createMarshal(name));
			return true;
		}
		return false;
	}
	
	public static boolean isLave() {
		return lave>0;
	}
	
}
